package constant

var (
	ProdConfigUrl     = "https://h5.shengu.info"
	TestConfigUrl     = "https://test.shengu.info"
	ProdShopConfigUrl = "https://m.shengu.shop"
	TestShopConfigUrl = "https://m-test.shengu.shop"
)

type KfConfig struct {
	Url   string `json:"url"`
	Level int    `json:"level"`
}

// 客服链接配置
var (
	KfLink  = "https://work.weixin.qq.com/kfid/kfcaef4251df1396d6e"
	KfId    = "wkK0GgDwAAgFUniZe1gjlaDSdaHvSnmg"
	KfIdMap = map[string]*KfConfig{
		"wkK0GgDwAAgFUniZe1gjlaDSdaHvSnmg": &KfConfig{

			Url:   "https://work.weixin.qq.com/kfid/kfcaef4251df1396d6e",
			Level: 1,
		},
	}
)

func GetLevelByKfId(kfId string) int {
	for k, v := range KfIdMap {
		if k == kfId {
			return v.Level
		}
	}
	return 0
}

func GetKfId(level int) string {
	for k, v := range KfIdMap {
		if v.Level == level {
			return k
		}
	}
	return ""
}

func GetKfUrl(level int) string {
	for _, v := range KfIdMap {
		if v.Level == level {
			return v.Url
		}
	}
	return ""
}

var fruitsConfig = []string{
	"苹果",
	"香蕉",
	"蓝莓",
	"樱桃",
	"橙子",
	"梨",
	"桃子",
	"草莓",
	"葡萄",
	"西瓜",
	"菠萝",
	"柠檬",
	"橘子",
	"猕猴桃",
	"石榴",
	"芒果",
	"椰子",
	"杏子",
	"无花果",
	"百香果",
}

func GetFruits() []string {
	return fruitsConfig
}
